#include <stdio.h>
#include <math.h>

int main (void)

{
	int x=-5,y;
	while (x != 5)
	{
		y=f(x);
		printf("%3d \n",y);
		x++;
	}
	return 0;
}

int f(int x)
{
	int b;
	b= pow(x,3)+3*pow(x,2)-24*x+30;
	return b;
}